<template>
  <div class="app">
    <div>app组件-{{ money }}</div>
    <div>车：{{ car }}</div>
    <ACom :money="money" />
  </div>
</template>

<script setup>
import ACom from './ACom.vue';
import { ref, provide } from 'vue'
const money = ref(100)
const car = ref('桑塔纳')

// 给子孙组件提供数据
provide('car', car)

</script>
<style>
.app {
  border: 5px solid #ccc;
  padding: 10px;
  width: 1000px;
  height: 500px;
  margin: 30px auto;
}
</style>
